<template>
	<view>
		<view v-if="content.type==0" class="uni-common-mt" style="background:#FFF; padding:20rpx;">
			<!-- <rich-text class="content" :nodes="content.content"></rich-text> -->
			<view class="content" v-html="content.content"></view>
		</view>

		<!-- 图片显示 -->
		<view v-if="content.type==1">
			<view class="contentImage">
				<view class="contentItem">
					<swiper class="swiper" :indicator-dots="indicatorDots" :interval="interval" :duration="duration">
						<swiper-item v-for="(item,index) in content.fileList">
							<image :src="item.url"></image>
						</swiper-item>
					</swiper>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	import api from '../../api/index.js'
	export default {
		data() {
			return {
				content: {},
				infoList: [],
				indicatorDots: true,
				interval: 2000,
				duration: 500,
			}
		},
		onLoad(options) {
			this.getDetail(options.id)
		},
		methods: {
			getDetail(id) {
				api.joinHellp.getAgenment(id).then(res => {
					if (res.code == 1) {
						this.content = res.data;
						uni.setNavigationBarTitle({
							title: res.data.name
						})
					}
				})
			}
		}
	}
</script>

<style>
	@import "../../static/css/common.css";
	@import url("./protocol.css");

	.box {
		height: 100vh;
	}

	.contentImage image {
		width: 100%;
		margin-bottom: 20rpx;
	}

    .content >>>table{
		border-collapse: collapse;
	}
	.content
	>>>table  td {
		border: 1rpx solid #999;
	}
</style>
